<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return view('welcome');
});

//测试
Route::get('/test', 'TestController@index');

Route::group(['middleware' => ['web'], 'prefix' => 'admin', 'namespace' => 'Admin'], function () {
    Route::resource('login', 'LoginController');
});

//后台管理
Route::group(['middleware' => ['web', 'permission', 'checkRoles'], 'prefix' => 'admin', 'namespace' => 'Admin'], function () {
    //退出
    Route::get('/logout', 'LoginController@logout');
    //发送邮件验证码
    Route::any('send_email_code', ['as' => 'send_email_code', 'uses' => 'SmsController@send_email_code']);
    //发送手机验证码
    Route::any('send_phone_code', ['as' => 'send_phone_code', 'uses' => 'SmsController@send_phone_code']);

    Route::post('/articles', 'UserController@add_user');
    Route::put('message_update/{id}', 'MessageTplController@message_update');

    //解绑商家
    Route::any('unbind_business', 'LegalController@unbind_business');

    //左仁慈
    //货币列表
    Route::any('currency_list', 'CurrencyController@index'); //货币列表
    Route::any('modify', 'CurrencyController@modify'); //货币列表
    Route::any('currency_add_view', 'CurrencyController@currency_add_view'); //货币添加页面
    Route::any('/currency_add', 'CurrencyController@currency_add'); //货币添加修改方法
    Route::any('currency_editor', 'CurrencyController@currency_editor'); //货币修改页面
    Route::any('currency_recharge_info', 'CurrencyController@currency_recharge_info'); //充币记录
    Route::any('currency_extract_info', 'CurrencyController@currency_extract_info'); //提币记录
    Route::any('top_up', 'TurnController@top_up'); //充钱功能
    Route::any('top_up_submit', 'TurnController@top_up_submit'); //充钱功能

    //交易管理
    Route::any('entrust_list', 'EntrustController@index'); //委托记录列表
    Route::any('entrust_details', 'EntrustController@entrust_details'); //委托记录完成查看
    Route::any('entrust_undo', 'EntrustController@entrust_undo'); //委托取消
    Route::any('entrust_order', 'EntrustController@entrust_order'); //委托取消

    //李振华
    //会员管理
    Route::any('add_user', 'UserController@add_user'); //会员添加
    Route::any('editor_user', 'UserController@editor_user'); //会员添加
    Route::any('user_list', 'UserController@index'); //会员列表
    Route::any('finance_list', 'UserController@finance_list'); //财务日志
    Route::any('user_info', 'UserController@user_info'); //个人信息
    Route::any('audit_user', 'UserController@audit_user'); //审核列表
    Route::any('audit_info', 'UserController@audit_info'); //审核详细信息
    Route::any('slide_list', 'SlideController@slide_list'); //幻灯片列表
    Route::any('add_slide_info', 'SlideController@add_slide_info'); //幻灯片的添加
    Route::any('add_slide', 'SlideController@add_slide'); //幻灯片的添加
    Route::any('editor_slide', 'SlideController@editor_slide'); //幻灯片的编辑
    Route::any('del_slide', 'SlideController@del_slide'); //幻灯片的删除

    Route::any('update_user', 'UserController@update_user'); //修改个人信息
    Route::any('check_user', 'UserController@check_user'); //实名认证
    Route::any('check_user_info', 'UserController@check_user_info'); //实名认证
    Route::any('check_audit_info', 'UserController@check_audit_info'); //实名认证

    Route::any('tpl_index', 'MessageTplController@index');
    Route::any('tpl_create', 'MessageTplController@create');
    Route::any('tpl_store', 'MessageTplController@store');
    Route::any('tpl_edit/{id}', 'MessageTplController@edit');
    Route::any('tpl_update/{id}', 'MessageTplController@update');
    Route::any('tpl_destroy', 'MessageTplController@destroy');
    Route::any('upload_img', 'MessageTplController@upload_img');

    Route::any('message_index', 'MessageTplController@message_index');
    Route::any('message_create', 'MessageTplController@message_create');
    Route::any('message_store', 'MessageTplController@message_store');
    Route::any('message_edit/{id}', 'MessageTplController@message_edit');
    Route::any('select_user', 'MessageTplController@select_user');
    Route::any('message_destroy', 'MessageTplController@message_destroy');

    Route::any('ability_index', 'AbilitiesController@index');
    Route::any('ability_create', 'AbilitiesController@create');
    Route::any('ability_store', 'AbilitiesController@store');
    Route::any('ability_edit/{id}', 'AbilitiesController@edit');
    Route::any('ability_update/{id}', 'AbilitiesController@update');
    Route::any('ability_destroy', 'AbilitiesController@destroy');

    Route::any('role_index', 'RolesController@index');
    Route::any('role_create', 'RolesController@create');
    Route::any('role_store', 'RolesController@store');
    Route::any('role_edit/{id}', 'RolesController@edit');
    Route::any('role_update/{id}', 'RolesController@update');
    Route::any('role_destroy', 'RolesController@destroy');

    //法币交易 商家列表
    Route::get('business_list', 'BusinessController@business_list');
    //法币交易 商家审核列表
    Route::get('busi_check_list', 'BusinessController@busi_check_list');
    //法币交易 交易挂单记录
    Route::get('rech_order_list', 'LegalController@rech_order_list');
    //交易记录
    Route::get('recharge_list', 'LegalController@recharge_list');
    //撤销广告单
    Route::get('cancel_rech_order', 'LegalController@cancel_rech_order');

    //审核商家页面
    Route::get('audit_business', 'BusinessController@audit_business');
    //审核状态修改
    Route::get('update_audit_status', 'BusinessController@update_audit_status');
    //解绑申请列表
    Route::get('unbind_list', 'BusinessController@unbind_list');
    //usdt价格设置
    Route::get('usdt_price_list', 'PriceController@usdt_price_list');
    //修改usdt价格
    Route::post('update_usdt_price', 'PriceController@update_usdt_price');
    //广告单价格区间列表
    Route::get('rech_price_list', 'PriceController@rech_price_list');
    //新增usdt价格
    Route::get('create_price_section', 'PriceController@create_price_section');
    //保存新增
    Route::post('save_price_section', 'PriceController@save_price_section');
    //编辑价格
    Route::get('edit_price_section', 'PriceController@edit_price_section');
    //保存修改
    Route::any('update_price_section', 'PriceController@update_price_section');
    //删除
    Route::any('delete_price_section', 'PriceController@delete_price_section');
    //申述过期时间
    Route::get('appeal_expire_time', 'PriceController@appeal_expire_time');
    //保存申述过期时间
    Route::post('save_appeal_time', 'PriceController@save_appeal_time');

    //统计数据
    Route::get('count_deal', 'CountController@count_deal');
    Route::any('error_list', 'ErrorController@index');
    Route::get('log_info', 'ErrorController@log_info');

    //系统钱包列表
    Route::get('wallet_list', 'WalletController@wallet_list');
    //分配用户钱包列表
    Route::get('allot_wallet_list', 'WalletController@allot_wallet_list');
    //用户提币申请
    Route::get('withdraw_list', 'WalletController@withdraw_list');
    //查询地址余额
    Route::get('get_address_balance', 'WalletController@get_address_balance');
    //确认发币页面
    Route::get('confirm_currency', 'WalletController@confirm_currency');
    //确认发币
    Route::post('confirm_send_currency', 'WalletController@confirm_send_currency');
    //驳回提币申请
    Route::get('reject_apply', 'WalletController@reject_apply');
    //申诉列表
    Route::any('appeal_list', 'AppealController@appeal_list');
    //申述详情
    Route::get('appeal_info', 'AppealController@appeal_info');
    //保存申述结果
    Route::post('save_arbitration', 'AppealController@save_arbitration');

    //条例管理删除
    Route::get('delete/{id}', 'ConfigController@delete');

    Route::resource('index', 'IndexController');
//    Route::resource('bank', 'BankController');
    Route::resource('sms', 'SmsController');
    Route::resource('admin', 'AdminController');
    Route::resource('finance', 'FinanceController');
    Route::resource('turn', 'TurnController');
    Route::resource('system', 'SystemController');
    Route::resource('test', 'TestController');
    Route::resource('article', 'ArticleController');
    Route::resource('version', 'VersionController');
    Route::resource('config', 'ConfigController');   //管理条例 条例列表
});
